package models;

import play.*;
import play.db.jpa.*;

import javax.persistence.*;
import java.util.*;

@Entity(name="Tag")
public class Tag extends Model {
	@Column(unique=true)
	public String name;
	
	public Integer qty;
	
	@ManyToMany(mappedBy="tags")
	public Set<Circle> circlesWithTag;
	
	public Tag(String name) {
		this.name = name;
		this.qty = 0;
		this.circlesWithTag = new HashSet<Circle>();
	}
}
